//
// Created by ✎﹏ℳ๓独赏 ☆独醉 on 2023/4/16.
//
#include <stdio.h>
int total01(char *arr){
    int count=0;
    while(*arr!='\0'){
        count++;
        arr++;
    }
    return count;
}
/*
 * total02("hello world")
 * 1+total02("ello world")
 * 1+1+total02("llo world")
 * 1+1+1+total02("lo world")
 * .
 * .
 * .
 * 1+1+1+1+...+total02('\0')
 */
int total02(char *arr){
    if(*arr!='\0'){
        return(1+ total02(arr+1));
    } else{
        return 0;
    }
}
int main(){
    char arr[]="hello world";
//    gets(arr);
    printf("%d\n",total01(arr));
    printf("%d\n",total02(arr));
    return 0;
}